<!DOCTYPE html>
<title>Test that play() from EMPTY network state triggers load() and async playing event.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video></video>
<script>
async_test(function(t) {
    var video = document.querySelector("video");
    assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY);

    video.onloadstart = t.step_func(function() {});
    video.onratechange = t.step_func(function() {});
    video.onwaiting = t.step_func(function() {});
    video.ondurationchange = t.step_func(function() {});
    video.onloadedmetadata = t.step_func(function() {});
    video.onloadeddata = t.step_func(function() {});
    video.oncanplay = t.step_func(function() {});
    video.onplay = t.step_func(function() {});

    video.onplaying = t.step_func_done(function () {
        assert_false(video.paused);
    });

    video.src = "content/test.ogv";
    video.play();
});
</script>